package com.qys.livesMall.shop.service;

import com.qys.livesMall.shop.modal.entity.ShopOrderComment;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 * 商品评论表 服务类
 * </p>
 *
 * @author gmx
 * @since 2023-06-30
 */
public interface ShopOrderCommentService extends IService<ShopOrderComment> {

    List<ShopOrderComment> queryComment(Long orderId);

    /**
     * 判断用户是是否已经点赞过
     * @param commentId 评论id
     * @param userId    用户id
     * @return
     */
    boolean haveLiked(Long commentId, Long userId);

    /**
     * 保存点赞
     * @param commentId 评论id
     * @param userId    用户id
     */
    void saveLike(Long commentId, Long userId);

}
